<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<%@ taglib tagdir="/WEB-INF/tags" prefix="matrix"%>
<%@ taglib uri="http://matrixcsm.zkingsoft.com" prefix="cms"%>
<cms:ads   code="'img_jIiek0'"></cms:ads>
<!DOCTYPE html>
<html>
<head>
  <title>${网页标题}</title>
  <meta charset="UTF-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <link rel="stylesheet" href="http://gwfile.csxuncong.com/wantaien/pc/css/swiper.min.css">
  <link rel="stylesheet" href="http://gwfile.csxuncong.com/wantaien/pc/css/animate.css">
  <link rel="stylesheet" href="http://gwfile.csxuncong.com/wantaien/pc/css/common.css">
  <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <style>
        body{
            background: #f7f7f7;
        }
        .tab-content p{
            font-size: 16px;
            color: #090909;
            line-height: 30px;
        }
        .em{
            font-weight: bold;
        }
        .common-box{
            padding: 30px 50px;
            background: #ffffff;
            min-height: 300px;
        }
    </style>

  <meta name="keywords" content="${网页关键词}">
  <meta name="description" content="${网页描述 }">
</head>
<body>
    <jsp:include page="_top.jsp"></jsp:include> 
    <div class="banner">
        <img src="${img_jIiek0.adImg}" class="img zy" data-type="ad" data-id="${img_jIiek0.adId}">
    </div>
    <div class="tab">
        <div class="container">
            <cms:arts var="artList" code="cpyy" pageNow="0" pageSize="999"></cms:arts>
            <c:forEach items="${artList }" var="item" >
                <span class="tab-item">${item.artTitle}</span>
            </c:forEach>
        </div>
    </div>
    
    <div class="container">
        <!-- 营养保健 -->
        <c:forEach items="${artList }" var="item" >
        <div class="tab-content hide">
            <div class="common-box">
                <div class="flex animate__animated animate__fadeInUp">
                    <h3 class="title">${item.artTitle}</h3>
                </div>
                <div class="animate__animated animate__fadeInUp">
                    ${item.artContent}
                </div>
            </div>
        </div>
        </c:forEach>
    </div>
    <jsp:include page="_footer.jsp"></jsp:include>  
</body>
    <script src="http://gwfile.csxuncong.com/wantaien/pc/js/swiper.min.js"></script>
    <script>
         window.onload = function(){
            var itemEls = document.getElementsByClassName('tab-item');
            var contentEls = document.getElementsByClassName('tab-content');
            var type = getQueryVariable('type') || 0;
            tabChange(type)
            
            for(var i= 0; i < itemEls.length;i++){
                let index = i;
                itemEls[i].onclick = tabChange.bind(this, index)
            }

            function tabChange(index){
                for(var i= 0; i < itemEls.length;i++){
                    itemEls[i].className="tab-item";
                    contentEls[i].className="tab-content hide";
                }
                itemEls[index].className="tab-item active";
                contentEls[index].className="tab-content";
            }
            function getQueryVariable(variable)
            {
                var query = window.location.search.substring(1);
                var vars = query.split("&");
                for (var i=0;i<vars.length;i++) {
                        var pair = vars[i].split("=");
                        if(pair[0] == variable){return pair[1];}
                }
                return(false);
            }
         }
    </script>
</html>